package com.hpeng.basic.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.hpeng.basic.dao.AssetMeasurementUnitDao;
import com.hpeng.basic.service.AssetMeasurementUnitManager;
import com.hpeng.sys.model.AssetMeasurementUnit;
import com.hpeng.util.Pagination;
@Component("assetMeasurementUnitManager")
public class AssetMeasurementUnitManagerImpl implements
		AssetMeasurementUnitManager {
	@Resource
	private AssetMeasurementUnitDao assetMeasurementUnitDao;

	public AssetMeasurementUnit addAssetMeasurementUnit(
			AssetMeasurementUnit assetMeasurementUnit) {
		// TODO Auto-generated method stub
		return assetMeasurementUnitDao.save(assetMeasurementUnit);
	}

	public void delAssetMeasurementUnit(String unid) {
		// TODO Auto-generated method stub
		assetMeasurementUnitDao.remove(unid);
	}
	public List<AssetMeasurementUnit> findAssetMeasurementUnit() {
		// TODO Auto-generated method stub
		return assetMeasurementUnitDao.getAll();
	}

	public AssetMeasurementUnit findAssetMeasurementUnitById(String unid) {
		// TODO Auto-generated method stub
		return assetMeasurementUnitDao.get(unid);
	}

	public Pagination<AssetMeasurementUnit> getPagination(int pageNumber,
			String[] hql, String order) {
		// TODO Auto-generated method stub
		return assetMeasurementUnitDao.getPagination(pageNumber, hql, order);
	}

	public void updateAssetMeasurementUnit(
			AssetMeasurementUnit assetMeasurementUnit) {
		// TODO Auto-generated method stub
		assetMeasurementUnitDao.update(assetMeasurementUnit);
	}

}
